package com.yunxi.service.dubboService.impl.sto;

import com.yunxi.sto.service.StoFrozenHisDubboService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import com.yunxi.sto.pojo.StoFrozenHisVO;
import java.util.List;
import org.springframework.beans.BeanUtils;
import com.github.pagehelper.PageInfo;
import com.yunxi.service.localService.sto.StoFrozenHisService;
import com.yunxi.model.sto.StoFrozenHis;

/**
 * <p>
 * 车辆/库位冻结历史 服务实现类
 * </p>
 *
 * @author caoyong
 * @since 2019-10-11
 */
public class StoFrozenHisDubboServiceImpl implements StoFrozenHisDubboService {

    @Autowired
    @Qualifier(value = "stoFrozenHisServiceImpl")
    StoFrozenHisService stoFrozenHisService;


    @Override
    public StoFrozenHisVO getById(String id) throws Exception {
        StoFrozenHis stoFrozenHis = stoFrozenHisService.getById(id);
        StoFrozenHisVO stoFrozenHisVO = new StoFrozenHisVO();
        BeanUtils.copyProperties(stoFrozenHis,stoFrozenHisVO);
        return stoFrozenHisVO;
    }

    @Override
    public void saveOrUpdate(StoFrozenHisVO stoFrozenHisVO) throws Exception {
        StoFrozenHis stoFrozenHis = new StoFrozenHis();
        BeanUtils.copyProperties(stoFrozenHisVO,stoFrozenHis);
        stoFrozenHisService.saveOrUpdate(stoFrozenHis);
    }

    @Override
    public void removeById(String id) {
        stoFrozenHisService.removeById(id);
    }

    @Override
    public PageInfo<StoFrozenHisVO> findPageByVO(StoFrozenHisVO stoFrozenHisVO, Integer pageNum, Integer pageSize) throws Exception {
        PageInfo<StoFrozenHisVO> pageInfo = stoFrozenHisService.pageByVo(stoFrozenHisVO,pageNum,pageSize);
        return pageInfo;
    }

    @Override
    public void removeByListVo(List<StoFrozenHisVO> stoFrozenHisVOList) throws Exception {
        stoFrozenHisService.removeByListVo(stoFrozenHisVOList);
    }

    @Override
    public List listByVo(StoFrozenHisVO stoFrozenHisVO) {
        return stoFrozenHisService.listByVo(stoFrozenHisVO);
    }
}
